﻿<%@ Page Language="C#" MasterPageFile="~/default.master" AutoEventWireup="true" CodeFile="OrderDetail.aspx.cs"
    Inherits="OrderDetail" %>

<%@ Register Src="~/controls/ctrlCustomerData.ascx" TagPrefix="own" TagName="CustomerData" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="Server">

    <script language="javascript" type="text/javascript" src="Javascript/OrderDetail.js"></script>

    <h2>
        <%=Resources.Language.AddressData %></h2>
    <div id="order-data" align="center">
        <asp:Panel ID="pnlCustomerData" runat="server">
            <asp:Label ID="lblError" runat="server" ForeColor="Red" Font-Bold="true" Visible="false"
                EnableViewState="false"></asp:Label>
            <own:CustomerData ID="ctrlCustomerData" runat="server" />
        </asp:Panel>
        <div id="payment-data">
            <h1>
                <%=Resources.Language.PaymentForm %></h1>
            <asp:RadioButtonList ID="rblPayments" CssClass="payment-type" runat="server" DataTextField="PaymentName"
                DataValueField="PaymentID" AppendDataBoundItems="True">
            </asp:RadioButtonList>
        </div>
        <div id="online-payment" style="display: none;">
            <h1>
                <%=Resources.Language.OnlinePayments %></h1>
            <table class="payment-type">
                <asp:Repeater ID="rptOnlinePayments" runat="server" OnItemDataBound="rptOnlinePayments_ItemDataBound">
                    <ItemTemplate>
                        <tr>
                            <td style="text-align: right;">
                                <asp:Image ID="imgPO1" runat="server" ImageUrl='<%# Eval("IconFile") %>' />
                                <asp:Image ID="imgPO2" runat="server" Visible="False" />
                            </td>
                            <td>
                                <asp:RadioButton Text='<%# Eval("PaymentName") %>' runat="server" GroupName="rbgOnlinePayments"
                                    ID="rbOP" />
                                <asp:HiddenField runat="server" ID="hfOP" Value='<%# Eval("PaymentID") %>' />
                                <br />
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </div>
        <div id="rate-payment" style="display: none">
            <h1>
                <%=Resources.Language.InstalementPayments %></h1>
            <asp:CheckBox ID="chbRate" runat="server" />
            <%=Resources.Language.OrderDetailMessage1a %>
            <a href="javascript: window.open('http://www.zagiel.com.pl/kalkulator/jak_kupic.html','jakkupic','height=600, width=580, location=0, menubar=0, resizable=0, scrollbars=1, status=0, titlebar=0, toolbar=0','false'); void(0);">
                <%=Resources.Language.OrderDetailMessage1b %></a>
            <%=Resources.Language.OrderDetailMessage1c %>
            <br />
            <asp:Label ID="lblRateAcceptFault" runat="server" ForeColor="Red" Visible="False"
                Text="<%$Resources:Language,OrderDetailMessage2 %>"></asp:Label>
        </div>
        <div>
            <h1>
                <%=Resources.Language.Voucher %></h1>   
                <%=Resources.Language.GiveVoucher %>:<br />
                <asp:TextBox ID="tbVoucher" runat="server" Width="300px" MaxLength="9" />
                <asp:Label ID="lbVoucherError" runat="server" Text="<%$Resources:Language, WrongVoucher%>" ForeColor="Red" Visible="false"/> 
                <asp:Label ID="lbOrderValToLow" runat="server" Text="" ForeColor="Red" Visible="false"/> 
        </div>
        <div id="dShipmentType" runat="server">
            <h1>
                <%=Resources.Language.Shipment %></h1>
            <asp:RadioButtonList ID="rblShipmentType" runat="server" DataTextField="ShipmentName"
                DataValueField="ShipmentID">
            </asp:RadioButtonList>
            <asp:Panel ID="pnlPayments" runat="server">
                <asp:Label ID="lblNoShipment" runat="server" ForeColor="Red" Text="<%$Resources:Language, NoShipmentTypeAvailable%>"></asp:Label>
            </asp:Panel>
        </div>
        <div>
            <h1>
                <%=Resources.Language.AdditionalInfo %>
            </h1>
            <asp:TextBox ID="tbAdditionalInfo" runat="server" TextMode="MultiLine" Width="90%"></asp:TextBox>
        </div>
        <div style="width: 200px">
            <asp:Button ID="btnConfirm" runat="server" Text="<%$Resources:Language,Continue %>"
                OnClick="btnConfirm_Click" />
        </div>
    </div>
</asp:Content>
